package cn.cupk.logsystem.log.observerPattern;


import cn.cupk.logsystem.log.LogRecord;
import cn.cupk.logsystem.log.strategypattren.Formatter;

public abstract class Handler {
    private Formatter formatter;

    public void setFormatter(Formatter formatter) {
        this.formatter = formatter;
    }

    public Formatter getFormatter() {
        return formatter;
    }

    public abstract void publish(LogRecord record);

    public abstract void flush();

    public abstract void close() throws SecurityException;
}
